home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mfs055 / minixfs.doc < prev    next >
Text File  |  1992-04-13  |  12KB  |  227 lines

  1. This file gives brief details of the installable filesystem minix.xfs version
  2. 0.55 .
  3.  
  4.     If you don't have Minix then you are on your own ... to use minix
  5. partitions safely ideally you need a good fsck (filesystem checker) I'm working
  6. on a stand alone version which runs under TOS. Until then I wouldn't advise
  7. non-minix users to use minix partitions, unless you are absolutely sure you
  8. know what you are doing. Don't blame me if you trash a partition.
  9.  
  10. This driver works with both V1 and V2 filesystems , so if you are using minix
  11. 1.6.xxx with the new V2 filesytem then it should handle them OK . If you have
  12. very large partitions then you may need to use a disk editor to edit the
  13. sector size if it is > 1K . Also your driver needs to support the extra Rwabs
  14. parameter in order to access very large ( > 64 Mb or >32Mb if sector size is
  15. 512 bytes) partitions. The program 'minit' with the '-t' option is useful
  16. to test for this.
  17.  
  18. If minix.xfs will access your minix partitions on your setup OK then skip
  19. the next paragraph.
  20.  
  21.     If you can't access partitions then it is possible that your driver
  22. software wont access them . The partition type must be GEM (sorry but it's a bit
  23. awkward to access non-GEM partitions). Also the sector size on the minix
  24. partitions must be either 1K or 512 bytes (as well as the extended Rwabs call
  25. being mandatory for very large V2 partitions). If both of these are OK then
  26. maybe the driver software doesn't like the boot sector of your minix
  27. partitions . There are two solutions to this , described in greater detail
  28. in 'minit.doc'.  If you have minix filesystems on GEM partitions and the
  29. 'fixup' program still wont permit access to your partitions with minix.xfs then
  30. please let me know , giving details of your setup.
  31.  
  32. Now this version of minixfs uses all of the new feature in MiNT ... hardlinks
  33. symbolic links chmod,chown etc. Symbolic links may cause trouble if you have
  34. minix and try 'fsck' on them ... plain minix doesn't understand symbolic links
  35. and fsck will try to delete them. Note: an older symbolic link package for
  36. minix stuffed all the info in the inodes ... this wont work with minix.xfs .
  37. I think there is a newer symlinks package that does work . However the package
  38. must use the same mode for symbolic links , the default value is 0160000 edit
  39. either minixfs or the minix symlinks package so that the two agree and
  40. recompile as appropriate. Now about fsck ... if you are using minix 1.6.xxx then
  41. the new fsck will handle symlinks correctly if you add the flag
  42. -DI_SYMBOLIC_LINK=0160000 when you compile it . If aren't running 1.6.xxx
  43. then apply 'fsck.dif' (with patch) to the old minix fsck.c . 'fsck.dif' should
  44. be supplied with this filesystem driver . Keep the old fsck source though for
  45. upgrades . Note the dif assumes that the version of fsck you are using is the
  46. one with minix 1.5.10 (or 1.5 if its 'out of the box' and hasn't been upgraded
  47. from 1.1 ). The file should have crc 25152 (before patching) and 24070 after.
  48.  
  49. File locking has been added for this version, it has not been extensively
  50. tested so be careful !
  51.  
  52. Filename translation has been overhauled for this version. See the fscntl
  53. section for details.
  54.  
  55. Another potentially useful feature has been added to this version , you can
  56. have longer filenames if you initialise the filesystem properly. Currently
  57. this can only be done by wiping existing partitions . Also minix itself wont
  58. recognise this new format, though it may be possible to persuade it , I
  59. haven't tried this myself. I hope to have a non-destructive conversion method
  60. for longer filenames in the near future (possibly as an option to 'fsck' , if
  61. I ever get that working).
  62.  
  63. Three fscntl options are 'supported' the others present in the source are likely
  64. to change without notice ... so DO NOT use them !! The constants are defined in
  65. minixfs.h . All three of these interpret the value of 'arg' as a pointer to a
  66. long value. They are described below.
  67.  
  68. MFS_VERIFY , this is intended to check if the partition is minix , the value
  69. MFS_MAGIC will be sent to the long argument 'arg' points to.
  70.  
  71. MFS_SYNC , sync the filesystem in a manner similar to the unix sync() sys call.
  72. Minixfs does however sync the filesystem at regular intervals such as when any
  73. file is closed so it is certainly not necessary to call this before powering
  74. down the system.
  75.  
  76. MFS_CINVALID , invalidate all cache entries for the drive fscntl path resides
  77. on. This will be used by fsck (if I ever get it finished) so that a filesystem
  78. can be messed about with at a low level and the cache wont ever become out
  79. of sync with the physical filesystem (a recipe for disaster).
  80.  
  81. MFS_FINVALID , invalidate all file descriptors for the drive fscntl resides on.
  82.  
  83. MFS_IMODE , use 'arg' as an inode mode number to change the object pointed to
  84. by the fscntl path. This makes it possible to change directories to files and
  85. vice versa. If you aren't sure what that means do *not* use this option , you
  86. can trash filesystems with it !
  87.  
  88. MFS_INFO , 'arg' points to an mfs_info structure , this has the following
  89. entries (with meanings) :
  90.  
  91. long total_inodes,total_zones;
  92. long free_inodes,free_zones;
  93. int version;            /* Filesystem version 1=V1 2=V2 */
  94. int increment;            /* Directory increment */
  95. long res1,res2,res3,res4;    /* Reserved for future use */
  96.  
  97. 'int' is 16 bits in this context. 'increment' is a measure of the maximum
  98. filename length this is given by ((increment<<4)-2). This option is a
  99. effectively a more relevant minixfs version of 'dfree'.
  100.  
  101. MFS_GTRANS , the value 'arg' points to is set to the current translation
  102. options. (see MFS_STRANS).
  103.  
  104. MFS_STRANS , the current translation options are set to the value 'arg'
  105. points to. Since these options are global (i.e. affect all programs), the
  106. calling process must be root to do it. Currently valid options are the
  107. following or'ed together :
  108.  
  109. SRCH_TOS  : when searching for files translate the name searched for and the
  110.         name being matched to TOS 8+3 format , in tos domain. E.g. the
  111.         filename 'LargeName.c' becomes LARGENAM.C and can be accessed as
  112.         anything that gets translated to this , like LARgenamefile.C' .
  113. SRCH_MNT  : as above but MiNT domain.
  114. DIR_TOS   : when using Dreaddir in compatability mode (and Fsfirst/Fsnext)
  115.         translates filename to TOS 8+3 , tos domain only. In normal mode
  116.         filenames are *never* translated. Without this option filenames
  117.         longer than 12 characters will be truncated for Fsfirst/Fsnext.
  118. DIR_MNT   : as above but MiNT domain.
  119. AEXEC_TOS : files with extensions TTP,TOS,APP,PRG,ACC,GTP are automatically
  120.         given execute permissions in tos domain with this option
  121.         (comparison is not case sensitive so works for ttp, TtP too).
  122. AEXEC_MNT : as above but MiNT domain.
  123. LWR_TOS   : created filenames are translated to lower case in tos domain.
  124. LWR_MNT   : as above but MiNT domain.
  125.  
  126. The purpose of these options is to help programs expecting 8+3 filenames to
  127. work , e.g. the file selector. The default values for translation are in
  128. minixfs.h , in TRANS_DEFAULT. A sample program is supplied that allows these
  129. options to be set , see 'mfsconf.doc' for details.
  130.  
  131. A few other options . SCACHE_SIZE and UCACHE_SIZE , these determine the
  132. size (in K) of the caches used for minixfs , don't make them smaller than about
  133. 10 or the filesystem performance will deterriorate considerably. Increase them
  134. by all means, this will reduce the amount of I/O required by the filesystem.
  135. SCACHE refers to the system cache which is called for 'internal' operations such
  136. as reading/writing directories and inodes. UCACHE is the user cache which
  137. contains user data (from reading/writing files). These are separated so that
  138. if a program does a lot of file I/O minix.xfs wont have to re-read directories
  139. for example.
  140.  
  141. The MAX_INCREMENT determines the maximum value which may be passed to the '-n'
  142. option when creating the filesystem with minit. Unless you are using long
  143. filename filesystems , this option is irrelevant. However if you are using them
  144. then minix.xfs will not read a filesystem whose directory increment is bigger
  145. than MAX_INCREMENT. MAX_INCREMENT should be a power of two between 1 and 16
  146. (inclusive), its default is 2 which allows up to 30 characters in a filename
  147. of a suitable filesystem, this should be more than adequate for most cases.
  148. For more information about the long filename filesystems read 'minit.doc'.
  149.  
  150. The ROBUST compilation option syncs the filesystem whenever a write does more
  151. than a certain amount of i/o. This does slow things down somewhat but it makes
  152. it far less likely for a filesystem to be left in a mess if the system crashes
  153. while write operations are taking place (even without ROBUST only the file
  154. being written to may be damaged if a crash occurs). Without ROBUST things are
  155. somewhat quicker but less safe.
  156.  
  157. A note about the code . It was written as independently as possible from minix,
  158. so any resemblances are entirely coincidental (well what would you call
  159. something that searches directories other than search_dir , or allocates
  160. bits in a bitmap other than alloc_bit ?). Naturally I had to look up the
  161. format of inodes/superblock  and the disk layout and so some of the
  162. inode/superblock structures are the same. I could have changed all the names
  163. but this would have been pretty confusing for someone looking at the code
  164. that was familiar with the FS code in Minix, so I kept the originals as far
  165. as possible. Also please note filesystems are complex things to write and
  166. although I've tried to anticipate bugs it is possible one or two got through.
  167. If you spot *anything* that makes fsck in minix complain (other than symlinks
  168. in an unpatched fsck) please let me know and I'll try to fix any bugs asap.
  169.  
  170.     Now a few notes for future versions. Hopefully , now this is a separate
  171. filesystem, I should be able to upgrade/bugfix minix.xfs fairly independently
  172. of MiNT, so send and bugs/suggestions to the email below. However minix.xfs is
  173. not my number one priority and circumstances in the near future may make heavy
  174. demands on my time , so I can't guarantee immediate bugfixes or enhancements.
  175.  
  176.     I hope this program illustrates how useful installable filesystems are
  177. in MiNT, they could be easily used for other formats, such as Spectre or TT
  178. Unix (though not easily written!). I would be quite prepared to write such
  179. things, however there are two snags. Firstly I don't have access to the
  180. necessary information of the relevant filesystem format (or the software that
  181. uses them) and secondly I am not in a position to write such things free of
  182. charge. I'd be happy to discuss such things with any interested party, via
  183. either the email address below, phone or snail mail (or indeed any other
  184. programming projects).
  185.  
  186. A few credits, thanks to :
  187.  
  188. Eric R. Smith for MiNT and lots of helpful advice (not to mention re-writing
  189. minixfs to work as an installable filesystem).
  190.  
  191. Andy S Tanenbaum. For writing Minix in the first place.
  192.  
  193. Frans Meulenbroeks for the ST version of Minix.
  194.  
  195. Also thanks to everyone who sent in bugs reports or suggestions to this and
  196. earlier versions of minixfs.
  197.  
  198. Thanks must also go to everyone at Edinburgh University (and elsewhere) who
  199. supported the Tardis project which gave me net access up until August 1991,
  200. Tardis is sadly missed :-(
  201.  
  202. Finally, big thanks for Steve Usher for his help with my current email
  203. address.
  204.  
  205. All comments/questions/bugfixes/suggestions/flames to :
  206.  
  207. shenson@csm.ac.uk
  208.  
  209. My old address on nyx will still get through eventually.
  210.  
  211. Alternatively I can be reached via snail mail or telephone as :
  212.  
  213. S. N. Henson ,
  214.  4 Monaco Place,
  215.   Westlands, 
  216.    Newcastle ,
  217.     Staffs. ST5 2QT.
  218.      England.
  219.  
  220. Phone : +44 782 662808
  221.  
  222. I cannot guarantee to reply to articles posted to comp.sys.atari.st and
  223. comp.sys.atari.st.tech . In fact I don't read these groups much at all
  224. at present, so any suggestion or bug report are likely to never reach me
  225. if mentioned via Usenet. If you want to ensure you get a reply then
  226. USE EMAIL.
  227.